<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<nav class="navbar navbar-inverse">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="#">在线代码编辑器</a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
    		<c:if test="${not empty sessionScope.login_user }">
      <ul class="nav navbar-nav">
        <li><a href="user/main">我的代码</a></li>
        <li><a href="code/share/index">共享代码</a></li>
        <li><a href="code/add">写代码</a></li>
      </ul>
      </c:if>
      <ul class="nav navbar-nav navbar-right">
      	<c:if var="aa" test="${empty sessionScope.login_user }">
        <li><a href="regist.jsp">注册</a></li>
         <li class="active"><a href="login.jsp">登录</a></li>
         </c:if>
         <c:if test="${not aa }">
         <li><a>欢迎 ${sessionScope.login_user.nickName }</a></li>
         <li class="active"><a href="login.jsp" onclick="return confirm('确认要注销登录吗?');">注销</a></li>
         </c:if>
      </ul>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>
    